public class main01 {

    final String str = "这是一个String";
    int a = 12;
    static String name = "LC";

    public static void main(String[] args) {
//        System.out.println("hello,world");
//        System.out.println(max(1, 2));
//        System.out.println("hello," + name + "!");
//        PersonJava person = new PersonJava("LC", true);
//        person.age = 12;
//        System.out.println(person.age);
//        System.out.println(person.getName());
//        System.out.println(person.isMarred());
//        RectangleJava rectangleJava = new RectangleJava(10, 10);
//        System.out.println(getColorStr(ColorJava.BLUE));
        mix();
    }

    public static int max(int a, int b) {
        if (a > b) {
            return a;
        } else {
            return b;
        }
    }

    enum ColorJava {
        RED, ORANGE, YELLOW, GREEN, BLUE
    }

    public static String getColorStr(ColorJava colorJava) {
        String str = null;
        switch (colorJava) {
            case RED:
            case ORANGE:
            case YELLOW:
                str = "暖色调";
                break;
            case GREEN:
                str = "中色调";
                break;
            case BLUE:
                str = "冷色调";
                break;
        }
        return str;
    }

    private static void mix() {
        Animal animal = new Dog();
        if (animal instanceof Dog){
            ((Dog) animal).dig();
        }
    }
}
